import os
import pytest

current_path = os.path.dirname(os.path.abspath(__file__))
case_path = os.path.join(current_path, '..', 'testcases')
json_report_path = os.path.join(current_path, 'reports', 'allure-result')
html_report_path = os.path.join(current_path, 'reports', 'allure-report')

if __name__ == '__main__':
    pytest.main(['-s','-v','--alluredir=%s'%json_report_path,'--clean-alluredir'])
    os.system('allure generate %s -o %s --clean' % (json_report_path, html_report_path))
    # pytest.main(['-s', '-v'])
